#!/bin/bash
source entrypoint.sh
CMC_BASEDIR="/usr1"
cmc_LCRP="${CMC_BASEDIR}/LCRP_HOME"
LCRP_FILE="LCRP_HOME.zip"
[[ -f "${CMC_BASEDIR}"/"${LCRP_FILE}" ]] && rm -rf "${CMC_BASEDIR}"/"${LCRP_FILE}"*
if [ ! -d "${cmc_LCRP}" ];then
    cd "${CMC_BASEDIR}"
    wget "http://"${RELESE_IP}"/CMC_LCRP/"${LCRP_FILE}""
    unzip $LCRP_FILE
    cd -
fi
cmc_dir="${CMC_BASEDIR}/up_file"
[[ -d $cmc_dir ]] || mkdir -p $cmc_dir
sed -i "s#`grep userName "${cmc_LCRP}"/conf/Setting.xml`#<userName>zwx365138</userName>#g" "${cmc_LCRP}"/conf/Setting.xml
sed -i "s#`grep password "${cmc_LCRP}"/conf/Setting.xml`#<password>wsx@1qaz</password>#g" "${cmc_LCRP}"/conf/Setting.xml
sh "${cmc_LCRP}/bin/lcrp.sh" d "${BUILD_PATH}/cmc_file_download/conf/Dependency.xml"
